<template>
	<view v-if="isVerify" class="not-open">
		该功能暂未开通
	</view>
	<view v-else class="main-box">
		<view>
			<image id="form-box" mode="widthFix" class="bg-image" src="https://web.78keji.cn/images/xiaowus/ljj.jpg"></image>
		
			<view class="main-form-box">
				<!-- <xmly-submit-form :mobile="formData.mobile" :param="formData.param" :submit="formData.submit"
					:btnImg="imagePath + 'submit-btn.png'"></xmly-submit-form> -->


				<hdxsmobile :mobile="formData.mobile" :param="formData.param"
					:submit="formData.submit" :baseImagePath="imagePath"
					:btnImg="imagePath + 'btn.png'"></hdxsmobile>
			</view>
			<view class="" style="position: absolute;top: 1500rpx;width: 100%;	background-color: #bffadf;">
				<view class="tip-text">
					业务资费：首周免费，续订29.9元/月（随时取消）
				</view>
				<view class="tip-text">
					续订权益：29.9元=互动小说月卡+100元团油加油券
				<view class="tip-text">
					客服热线：400-8825-010
				</view>
			</view>
		
			<!-- <image mode="widthFix" class="bg-image" :src="imagePath + 'bottom.png'"></image> -->
		</view>

	
</view>

	</view>
</template>

<script>
	import httpUtil from "@/utils/httpUtil";
	import commonApi from "@/api/commonApi";
	import userApi from "@/api/userApi";
	import backMiniApi from "../../api/backMiniApi";
	import logApi from "../../api/logApi";
	import paramApi from "../../api/paramApi";

	export default {
		data() {
			return {
				isVerify: false,
				scrollTop: 0,
				imagePath: 'https://web.78keji.cn/images/xiaowus/',
				scrollToTargetId: "form-box",
				formData: {
					mobile: '',
					param: '',
					submit: 0,
					intervalId: '',
				}
			}
		},
		onLoad(option) {
			this.initData(option)
				my.hideBackHome()
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop
		},
		methods: {
			uuid() {
			    var s = [];
			    var hexDigits = "0123456789abcdef";
			    for (var i = 0; i < 36; i++) {
			        s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
			    }
			    s[14] = "4";  // bits 12-15 of the time_hi_and_version field to 0010
			    s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);  // bits 6-7 of the clock_seq_hi_and_reserved to 01
			    s[8] = s[13] = s[18] = s[23] = "-";
			 
			    var uuid = s.join("");
				uni.setStorageSync('uuid', uuid)
			    return uuid;
			},
			initData(option) {
				// option.a = '123aaa'
				// option.param = '123'
				// option.backMiniParam = '123'
				// this.initParam(option)
				backMiniApi.initBackMiniParam(option)

				logApi.addXiaoWuGushiLog('initData option:' + JSON.stringify(option))
				paramApi.initData(option)

				if (!userApi.getUserId()) {
					userApi.initUserId()
				}

				if (option.submit) {
					this.formData.submit = option.submit
				}

				commonApi.isVerify(res => {
					this.isVerify = res
				})
				commonApi.is404()
			let paramx = {
				a: httpUtil.getA(),
				proCode:'LH2522',
				uuid:this.uuid()
			}
			httpUtil.post('/api/tongji/tongji0520',paramx,res=>{
				
			})
			},
			initParam(option) {
				if (option.a) {
					httpUtil.setA(option.a)
				}
				if (option.param) {
					userApi.setParam(option.param)
				}
			}
		}
	}
</script>

<style lang="scss">
	.not-open {
		height: 100vh;
		display: flex;
		justify-content: center;
		align-items: center;
		color: #000;
	}

	.main-box {
		background-color: #bffadf;
		min-height: 100vh;
		
	}

	.main-form-box {
		width: 90%;
		position: absolute;
		left: 5%;
		top: 700rpx;
		// bottom: 10vh;
		margin: 20rpx auto 0;
	}

	.bg-image {
		width: 100%;
		height: auto;
	}

	.mobile-roll-left-box {
		position: relative;
		width: 90%;
		margin: 0 auto;
	}
	.tip-text {
		width: 100%;
		letter-spacing: 2rpx;
	
		text-align: center;
		margin-top: 16rpx;
		font-weight: 500;
		font-size: 20rpx;
		color: #0f0f0f;
	
	
	}
</style>